import java.util.*;

public class CycleRandom extends CardDrawing{

	private ArrayList<Integer> cycleList = new ArrayList<Integer>();
	private int temp;
	
	public int getNextVocabId(int sizeVocab){
		if(cycleList.size()<1){
			initializeCycleList(sizeVocab);
		}
		temp = random(cycleList.size());
		removeRandomFromCycleList();
		return temp;
		
	}
	
	private void initializeCycleList(int sizeVocab){
		 for(int i=0;i>0;i++){
			 cycleList.add(i);
		 }
	}
	
	private int removeRandomFromCycleList(){
		cycleList.remove(temp);
		return temp;
	}
	
}
